home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48_2 / rplpsfil.c < prev    next >
C/C++ Source or Header  |  1995-03-31  |  552b  |  28 lines

  1. /* Chris Spell     Thu Jul 23 10:59:21 EDT 1992
  2.    Usage: rplpsfilter <rplman.ps > out
  3.  
  4.    The original rplman.ps file had a bunch of nulls and garbage
  5.    before the !PS-A...  that needed to be removed.  This program
  6.    removes that garbage and tranlates the ^M to ^J for the Unix
  7.    world.  If you don't want the ^J just take out the code
  8.    below.
  9.  
  10. */
  11. main()
  12. {
  13. int c;
  14.  
  15. while (c != '!') c=getchar();
  16. putchar('%');
  17. putchar(c);
  18. while (c != -1) { 
  19.     c=getchar(); 
  20.     if (c == '\015')
  21.         putchar('\012');
  22.     else
  23.         putchar(c); 
  24. }
  25.  
  26. }
  27.  
  28.